package com.bbcare.followup.plat.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.bbcare.followup.plat.entity.PatientInfoHis;
import com.bbcare.followup.plat.entity.PatientTask;
import com.bbcare.treat.plat.entity.PtTrTask;

/**
 * 患者历史登记服务接口
 * 
 * @author tao
 *
 */
public interface IPatientInfoHisService {
    // 查询患者登记历史信息
    List<PatientInfoHis> getPatientInfoHis(Map<String, Object> paramMap) throws Exception;

    int patientInfoHisModify(Map<String, Object> paramMap) throws Exception;

    int patientInfoHisDelete(Map<String, Object> paramMap) throws Exception;

    List<Map<String, Object>> getActiveInfoList(Map<String, Object> paramMap) throws Exception;

    int getActiveInfoCount(Map<String, Object> paramMap) throws Exception;

    // 封装操作记录方法
    Map<String, Object> buildOperationRecord(Map<String, Object> paramMap) throws Exception;

    // 根据患者ID和队列ID 查询队列患者相关的医生
    List<Map<String, Object>> getActiveDoctorsByUserAndQueue(Map<String, Object> paramMap) throws Exception;

    // 活跃度患者统计 按日月
    List<Map<String, Object>> getActivePatientTrendStatistics(Map<String, Object> paramMap) throws Exception;

    // 失访患者list查询接口
    Map<String, Object> listPatientLost(Map<String, Object> paramMap) throws Exception;

    // 失访原因list查询接口
    Map<String, Object> listLostReason(Map<String, Object> paramMap) throws Exception;

    // 失访患者失访原因登记或修改接口
    void updatePtLostInfo(Map<String, Object> paramMap) throws Exception;

    // 获取患者窗口期任务list接口
    public List<PatientTask> getPatientWindowTaskList(Map<String, Object> servParamMap) throws Exception;

    // 窗口期任务患者发送随访提醒短信接口
    public void dealPatientWinTaskSmsSend(Map<String, Object> servParamMap) throws Exception;

    // 通用版获取科室排班接口
    public List<String> listOutPtRandSchedule(Map<String, Object> map) throws Exception;

    // 患者随访提醒记录查询接口
    public HashMap<String, Object> listPtInformRd(Map<String, Object> paramMap) throws Exception;

    // 临期患者记录查询接口
    public HashMap<String, Object> listPtWarnQueue(Map<String, Object> paramMap) throws Exception;

    // 患者随访提醒门诊地址及排班计划查询接口
    public HashMap<String, Object> getPtScheduleInfo(Map<String, Object> paramMap) throws Exception;

    // 保存操作记录服务
    void saveOperationRecord(Map<String, Object> paramMap) throws Exception;

    // 从队列中删除患者接口
    Map<String, Object> removePtInfoFromQueue(Map<String, Object> servParamMap) throws Exception;

    // 给患者添加临时任务接口
    Map<String, Object> saveNewTempPatientTask(Map<String, Object> paramMap) throws Exception;
    //更新临时随访任务。
    public Map<String, Object> updateTempTask(final Map<String, Object> paramMap) throws Exception;

    // 根据年龄获取患者list接口
    public List<Map<String, Object>> getPatientAgeWinList(Map<String, Object> servParamMap) throws Exception;

    // 按年龄为患者发送随访提醒短信接口
    public void dealPatientWinSmsSendForAge(Map<String, Object> servParamMap) throws Exception;
    
    // 根据下次随访时间获取患者list接口
    public List<PatientTask> getPatientFollowTimeList(Map<String, Object> servParamMap) throws Exception;
    
    //根据下次诊疗时间 获取患者list
    public List<PtTrTask> getPatientNextFollowTimeList(Map<String, Object> servParamMap) throws Exception;
    
    // 按随访时间为患者发送随访提醒短信接口
    public void dealPatientFollowTimeSmsSend(Map<String, Object> servParamMap) throws Exception;
    
    // 按年龄为患者发送随访提醒短信接口 --短信新发送方式
    public void dealPatientWinSmsSendForAgeNew(Map<String, Object> servParamMap) throws Exception;
    
    // 窗口期任务患者发送随访提醒短信接口 --短信新发送方式
    void dealPatientWinTaskSmsSendNew(Map<String, Object> servParamMap) throws Exception;
    
    // 根据年龄获取患者list接口  --短信新发送方式
    List<Map<String, Object>> getPatientAgeWinListNew(Map<String, Object> servParamMap) throws Exception;
    
    // 获取患者窗口期任务list接口 --短信新发送方式
    public List<PatientTask> getPatientWindowTaskListNew(Map<String, Object> servParamMap) throws Exception;
    
    void dealPatientWinTaskSmsSendByDoctor(Map<String, Object> servParamMap) throws Exception;
    
    void dealPtNextFollowTimeSmsSend(Map<String, Object> servParamMap)throws Exception;
    /**
     * 删除临时任务
     * @param paramMap
     * @return
     * @throws Exception
     */
	Map<String, Object> delTempPatientTask(Map<String, Object> paramMap)throws Exception;
}
